/**
 * 
 */
package de.midnightdance.client.test;

import java.util.List;

import javax.xml.ws.WebServiceException;

import de.midnightdance.client.ws.model.IllegalUserException_Exception;
import de.midnightdance.client.ws.model.RequiemQuery;
import de.midnightdance.client.ws.model.ServiceModelRequiem;
import de.midnightdance.client.ws.model.WebServiceModelRequiem;
import de.midnightdance.client.ws.model.entities.CharacterRequiemID;
import de.midnightdance.client.ws.model.entities.CharacterRequiemIDArray;
import de.midnightdance.client.ws.model.entities.RequiemUser;

/**
 * @author Surfer
 *
 */
public class LauncherClient {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try{
			//make user
			RequiemUser user = new RequiemUser();
			user.setName("InitUser");
			user.setPass("InitUserPassword");
			//
			WebServiceModelRequiem port = new ServiceModelRequiem().getWebServiceModelRequiemPort();
			CharacterRequiemIDArray results = port.executeQuery(new RequiemQuery(),user);
			List<CharacterRequiemID> characters = results.getItem();
			for (CharacterRequiemID characterRequiemID : characters) {
				System.out.println(characterRequiemID.getName());
			}
		}catch (WebServiceException exc){
			exc.printStackTrace();			
		} catch (IllegalUserException_Exception exc) {			
			exc.printStackTrace();
		}		

	}

}
